<template>
  <div>
    <el-form
      ref="form"
      :model="form"
      :rules="show.rules"
      label-width="80px"
      :inline="false"
      size="normal"
    >
      <el-form-item label="人事编号" prop="name">
        <el-input v-model="form.number"></el-input>
      </el-form-item>
      <el-form-item label="姓名" prop="name">
        <el-input v-model="form.name"></el-input>
      </el-form-item>
      <el-form-item label="手机号码" prop="tel">
        <el-input v-model="form.tel"></el-input>
      </el-form-item>
      <el-form-item label="邮箱" prop="email">
        <el-input v-model="form.email"></el-input>
      </el-form-item>
      <el-form-item label="密码" prop="password">
        <el-input v-model="form.password" type="password"></el-input>
      </el-form-item>
      <el-form-item label="确认密码" prop="aginPassword">
        <el-input v-model="form.aginPassword" type="password"></el-input>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'AllUser',

  props: {
    form: {
      type: Object,
      default: () => ({
        number: null,
        name: null,
        tel: '',
        email: '',
        password: '',
        aginPassword: ''
      })
    }
  },

  data() {
    return {
      show: {
        rules: {
          name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
          tel: [{ required: true, message: '请输入手机号码', trigger: 'blur' }],
          password: [
            { required: true, message: '请输入密码', trigger: 'blur' }
          ],
          aginPassword: [
            { required: true, message: '请输入确认密码', trigger: 'blur' }
          ]
        }
      }
    }
  }
}
</script>
